﻿using System;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;

namespace TestCluster
{
    /// <summary>
    /// 
    /// </summary>
    [DependsOn(
        typeof(TestClusterDomainModule),
        typeof(TestClusterApplicationContractsModule),
        typeof(AbpDddApplicationModule),
        typeof(AbpAutoMapperModule)
        )]
    public class TestClusterApplicationModule : AbpModule
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAutoMapperObjectMapper<TestClusterApplicationModule>();
            Configure<AbpAutoMapperOptions>(options =>
            {
                //是否一一映射
                options.AddMaps<TestClusterApplicationModule>(validate: false);
            });
        }
    }
}
